<% breadcrumb :attendee_categories %>

<div class="row">
  <div class="col-lg-12">
    <div class="ibox float-e-margins">
      <div class="ibox-title">
        <h5>用户标签管理</h5>
      </div>
      <div class="ibox-content">

        <div class="row">
          <div class="col-sm-12">
            <%= link_to '添加标签', new_event_attendee_category_path, class: 'btn btn-white btn-sm pull-right' %>
          </div>
        </div>

        <div class="table-responsive">
          <table class="table table-striped">
            <thead>
            <tr>
              <th>序号</th>
              <th>名称</th>
              <th>颜色</th>
              <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <% @categories.each do |category| %>
              <tr>
                <td><%=category.category_number%></td>
                <td><%=category.name%></td>
                <td><span style="background-color: <%=category.category_color %>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td>
                <td>
                  <%=link_to '编辑', edit_event_attendee_category_path(current_event, category), class: 'btn btn-white btn-xs' %>
                  <%=link_to '删除', event_attendee_category_path(current_event, category), method: :delete, data: {confirm: '是否确认删除标签？'}, class: 'btn btn-danger btn-outline btn-xs' %>
                </td>
              </tr>
            <% end %>
            </tbody>
          </table>

        </div>
      </div>
    </div>
  </div>
</div>
